class ThreadPool;

class SimpleThreadFactory : public ThreadFactory {
public:
    SimpleThreadFactory() = default;

    ~SimpleThreadFactory() override = default;

    SimpleThreadFactory(const SimpleThreadFactory &) = delete;

public:
    pthread_t &createThread(void *(task_function)(void *), void *args) override {
        pthread_t *pid =  new pthread_t();
        pthread_create(pid, nullptr, task_function, args);

        return *pid;
    }
};